﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsTheme.Helper;

namespace WindowsTheme.ThemeHelper
{
    public partial class Setting : Form
    {
        public Setting()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FileHelper.OpenFile(".\\");
        }

        private void button5_Click(object sender, EventArgs e)
        {
            FileHelper.OpenFile(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\AppData\Local\Microsoft\Windows\Themes");
        }

        private void button2_Click(object sender, EventArgs e)
        {
           

            if (MessageHelper.MessageShow("清理垃圾", "此举会删除您创建的所有主题，确定要这样做?"))//如果点击“确定”按钮

            {
                Console.WriteLine("缓存已清理");
                DirectoryInfo di = new DirectoryInfo(StaticValue.TempPath);
                di.Delete(true);
             
                Directory.CreateDirectory(StaticValue.Win7SucessTheme);
                Directory.CreateDirectory(StaticValue.ThemePath);
                MessageBox.Show("清理完成！");

            }

            else//如果点击“取消”按钮

            {

                Console.WriteLine("ffangqi");

            }
        }
    }
}
